home *** CD-ROM | disk | FTP | other *** search
- /*
- File: GradientImport.h
-
- Copyright ⌐ 1993-6, Adobe Systems Incorporated.
- All rights reserved.
-
- Utilities for import modules.
- */
-
- #ifndef __GradientImport_H__
- #define __GradientImport_H__
-
- #include "PIAcquire.h"
- #include "PIUtilities.h"
-
- /*****************************************************************************/
- /* Scripting keys. */
-
- #define keyMultiImportInfo 'mulK'
- #define classMultiImportStruct 'mulS'
- #define typeClassMultiImportStruct 'mulT'
- #define keyMultiImportCount keyMultiImportInfo // 'mulC'
- #define keyOurMode keyMode
- #define keyRows keyHorizontal
- #define keyColumns keyVertical
- #define typeGradientMode 'grmT'
- #define ourBitmapMode 'bitM'
- #define ourGrayscaleMode 'gryS'
- #define ourIndexedColorMode 'indX'
- #define ourRGBColorMode 'rgbC'
-
- /*****************************************************************************/
- /* Dialog constants. */
-
- #define dRowsItem 3
- #define dColsItem 4
- #define dFirstModeItem 5
- #define dLastModeItem 8
- #define dInvertItem 9
- #define dModeGroupItem 12
- #define kProxyItem 13 // later implementation
-
- /*****************************************************************************/
- /* Value bounds. */
-
- #define kRowsMin 1
- #define kRowsMax 30000
- #define kColumnsMin 1
- #define kColumnsMax 30000
- #define kMinDescriptors 1
- #define kMaxDescriptors 50
-
- #define kGutter 2 // 2 pixel gutter
-
- #define errHowdWeGetHere 16989
-
- /*****************************************************************************/
- /* The region of the image being acquired (an area and a range of planes). */
-
- typedef struct AcquireRegion
- {
- Rect rect;
- int16 loPlane;
- int16 hiPlane;
- }
- AcquireRegion;
-
- /* The layout of the data. */
-
- typedef struct AcquireDataLayout
- {
- int32 rowBytes;
- int32 colBytes;
- int32 planeBytes;
- }
- AcquireDataLayout;
-
- /*****************************************************************************/
-
- OSErr StoreData (AcquireRecord *stuff,
- void *data,
- AcquireRegion *region,
- AcquireDataLayout *layout);
-
- OSErr FetchData (AcquireRecord *stuff,
- void *data,
- AcquireRegion *region,
- AcquireDataLayout *layout);
-
- /*****************************************************************************/
-
- extern Handle hDllInstance;
-
- typedef struct Globals
- {
-
- short result;
- AcquireRecord *stuff;
-
- #if Macintosh
- DialogPtr dialog;
- DialogTHndl dialogHdl;
- #else
- HWND dialog;
- #endif
-
- short lastImages;
- short lastRows;
- short lastCols;
- short lastMode;
- Boolean lastInvert;
- Boolean queryForParameters;
- Boolean initParameters;
- Boolean continueImport;
-
- short nextImage;
-
- /* scripting info */
-
- uint32 count;
-
- PIReadDescriptor token;
- PIDescriptorHandle array [kMaxDescriptors];
-
- } Globals, *GPtr, **GHdl;
-
- /*****************************************************************************/
-
- #define gResult (globals->result)
- #define gStuff (globals->stuff)
-
- #define gDialog (globals->dialog)
- #define gDialogHdl (globals->dialogHdl)
-
- #define gLastImages (globals->lastImages)
- #define gLastRows (globals->lastRows)
- #define gLastCols (globals->lastCols)
- #define gLastMode (globals->lastMode)
- #define gLastInvert (globals->lastInvert)
-
- #define gNextImage (globals->nextImage)
-
- #define gQueryForParameters (globals->queryForParameters)
- #define gInitParameters (globals->initParameters)
- #define gContinueImport (globals->continueImport)
-
- #define gCount (globals->count)
- #define gArray (globals->array)
- #define gToken (globals->token)
-
- /*****************************************************************************/
-
- void DoAbout (GPtr globals);
- void OpenScriptParams (GPtr globals);
- void ReadScriptParams (GPtr globals);
- void CloseScriptParams (GPtr globals);
- OSErr WriteScriptParams (GPtr globals);
- OSType GetGradientMode (short plugInMode);
- short GetPlugInMode (OSType gradientMode);
- Boolean OpenOurDialog (GPtr globals);
- Boolean RunOurDialog (GPtr globals);
- void CloseOurDialog (GPtr globals);
- void CreateDescriptor (GPtr globals);
- void SwitchScriptInfo (GPtr globals, PIReadDescriptor readToken);
- OSErr CheckAndWriteScriptParams (GPtr globals);
- void GetProxyItemRect (HWND hDlg, Rect *proxyItemRect);
-
- /*****************************************************************************/
-
- #endif /* __GradientImport_H__ */